
<p><b>Syntax:</b> <i>error_log file [ debug | info | notice | warn | error | crit ] </i>
</p><p><b>Default:</b> <i>${prefix}/logs/error.log</i>
</p><p>Specifies the file where server (and fastcgi) errors are logged.
</p><p>Default values for the error level:
</p>
<ol><li>  in the main section - <code>error</code>
</li><li>  in the HTTP section - <code>crit</code>
</li><li>  in the server section - <code>crit</code>
</li></ol>
<p>Nginx supports separate error logging per virtual host. This is a unique feature, which lighttpd refuses to implement. For an example of separate error logging per server, see SeparateErrorLoggingPerVirtualHost and this mailing list thread on separating error logging per virtual host.
</p><p>If you've built Nginx with <code>--with-debug</code>, you may also use:
</p>
<pre class="code"><span class="kw1">error_log</span> LOGFILE <span class="br0">&#91;</span>debug_core | debug_alloc | debug_mutex | debug_event | debug_http | debug_imap<span class="br0">&#93;</span>;</pre>
<p>Note that <code>error_log off</code> does not disable logging - the log will be written to a file named "off". To disable logging, you may use:
</p>
<pre class="code"><span class="kw1">error_log</span> /dev/null crit;</pre>
<p>Also note that as of version 0.7.53, nginx will use a compiled-in default error log location until it has read the config file. If the user running nginx doesn't have write permission to this log location, nginx will raise an alert like this:
</p>
<br><i>Module: NginxHttpMainModule</i>